Fix completion in some editors, via @markknol.

Mark says this is still a rare issue, but for now close #216 and
close #220.