hasChild bugfix

fixes a bug connected with `$nodesMap` idea introduced in 60203637