Added nested flag for entities
By default, top level entities are returned by reference when they are nested. This new flag can override that.
By default, top level entities are returned by reference when they are nested. This new flag can override that.