Fixes #5218: Display generated classes in method call

Great regex :+1: