dpkg: Switch an assert() on a volatile variable to an internerr()
The assert() has a side-effect as the variable is volatile, switch it
to an internerr() so that we always get the same result regardless of
the build settings, NDEBUG in this case.
Warned-by: coverity