Change bsphack/esphack so that it is invisible in vertical mode. This package was implemented by Oliver Pretzel and catalogued for CTAN.
TeX Catalogue (CTAN Edition) by Graham Williams