Made tracking down faults easier.
Mirrored zero check in Java port which was added in b64df16949a76baedc5eeaa1327a0996c27fe420.