Fixed predicate for WeakMap in FOAMmodels.