Merge "Revert "Revert "Support unresolved fields in optimizing""