Fix overzealous input checking

Bug report <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=332468>.