refs #6447 Thorough test for all suspicious places.

Tested the pieces of code where changes can be expected
Merge branch 'feature/6447_UnitTest4MDBoxTree' into develop