\else
\expandafter#2#1\protect\@setref@{}% change \null to \protect\@setref@{}
\fi}
-\def\@setref@{\ifhmode\spacefactor\@m\fi}
+\gdef\@setref@{\ifhmode\spacefactor\@m\fi}
\endgroup
\if@compatibility\else
\def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi