Polymorphism ftw

Improves #3081 at request of @stefanpenner