Some fixes for the consistency testing calculate() method.
Authored by: bugman 2011-03-03
Parent: [r12759]
Child: [r12761]