Bug fixes relating to unwrapping arrays

BUG 1 : If 'SingularizeChildren' is set to false and UnwrapEntities is set to true, arrays would never get unwrapped.

Bug 2 : When unwrapping an array, the property that points at the array before the unwrap is not removed from the object after the unwrap.