Don't unnecessarily(?) drop compiler flags when rewriting

Change-Id: I674d1eeecee593e0d6ed83c34e2afa0ccad633b0