Cache instanciation of predicates

Resource.asPredicate was broken and Base.asPredicate is useless.