refs #6447 Thorough test for all suspicious places.

Tested the pieces of code where changes can be expected