When using mathtools with the option showonlyrefs I find a spurious vertical spacing. I have found a similar question but the issue there was a long equation, which is not my case. Consider the MWE
\documentclass{minimal}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs}
\begin{document}
\begin{equation}
\label{eq}
a=b
\end{equation}
This is an equation %\refeq{eq}
\end{document}
If one uncomments \refeq, the vertical space after the equation is reduced. Any ideas?

minimalclass for examples, see http://tex.stackexchange.com/questions/42114/why-should-the-minimal-class-be-avoided?s=1|1.8970 – egreg Jul 30 '15 at 18:02