fix to methodswith() de-duplication

also add methodswith(Type, Function)

this and other recent changes close #5067.