// wrap the iterator in a notNull filter to ensure any filtered
// layers (result is null) don't get passed on from the securityWrapper
// Function. When the AccessLevel is HIDDEN and a layer gets filtered
// out via a CatalogFilter - for example, this can happen with a
// LocalWorkspaceCatalogFilter and a virtual service request
return new CloseableIteratorAdapter(Iterators.filter(filteredWrapped,
com.google.common.base.Predicates.notNull()));
}