Fix bolt emit anchoring, and add corresponding test.