Added checkForProblems method that checks the sanity of the Context stacks after digestion has completed.