Revert "If generating an image, run initialization and other optimizations."

This reverts commit ada8536c19e57cbfe55dcb3c72aa95e79365ed21.

Reason for revert: test failures

Change-Id: I8640fe842d7f2255b5749403c798094f9e365fda
3 files changed