Fix #119; cache abstract filter's class

Like #120, but without modifying existing behavior.