Fixes #5218: Display generated classes in method call