Make Diagrams.Transform.under more polymorphic