Fixed mock generation for classes that use self:: constants in default values.