Modified OptimizeCode to only allow symbols in the multifield