Fixing removal of generated code

Currently generated code removal happens anytime the clean target is specified, which breaks some scenarios where I want to build based on code generated locally (this is the primary target scenario for developer spec builds).

Fixing this so the target only fires specifically before codegen.