Fix undefined variable problem in io.votable

As originally reported by @astrofrog in #1792