Bug where array of objects at end of document returned size() == 0