You are quite right, this is a bug. Thanks for the find (and fix)! The
fix you suggested is correct, so I've rolled a release (1.3.3) with
this update. This is the only change in the release, so there's no
need to update if you have compiled your own version already.