Clean up the indentation of generated code.

Only those commits starting with "Indent…" change the generated code. This should make us more consistently follow the rule that indentation is applied at the latest point where it can be.