Avoid double generation. Put the generated class into the same module of the declaration place.