Turn pop-mismatch and overpopped codes into asserts in debug builds.
This should never happen, but it does on Crashlytics #811.