Fix some broken codegen target synthesis code.

Also got rid of bogus duplicate is_synthetic concept.