Fix code for overwriting flags for the same compiler