For ENG-6042, bring back optimization, but be more careful about enabling it