CMS-4283 Content children not ordered correctly after insert

Fixed exception with undefined values.