GROOVY-7124: Prefer invokevirtual on the type of the receiver if known, rather than on the type of the declaring class. This is less fragile to API changes.