lua-factory: conditional operator does not typecheck

Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750038