[Bug 7501] Improved unit tests and improved the children check.