assert() here was totally wrong, better to catch this in all cases (NDEBUG does not change the behaviour).
This fixes https://github.com/voidlinux/xbps/issues/158