Added paranoia, and fixed unit tests to deal with calcrt changes.