Fixed bug where child's flags were not being set