Fix bug in 'getChild' reported by Aleksandr Bezobchuk