I am not sure there is a reasonable fix for this since \with does double
duty for passing named arguments to functions. You may want to argue
that \override/\revert should not be used in that fashion, but
assignments/\set have sort of the same problem (though admittedly
different syntax anyway).
It would be conceivable to keep "prop = val" as special syntax in the parser but make "\set" and "\override" parsed by the normal music function productions.
(And it would not be unreasonable to introduce a dedicated syntax for alist instead of continuing to abuse \with for that purpose, either.)