fix bugs reported by respec

mostly duplicate definitions, and incorrectly marked-up automatic references