Changed implementation of getRealChildren