Fixed a bug with enitity.fromObject() entity collections

It was not flushing the existing items in the collection before
adding new ones.