Stop building packages if there are totality mismatches

This is to stop libraries from preventing executables to build later.

Fixes #1214.