encoder: emit "end" without calling .push()

What I was doing before was hacky...