lookupByIds(): fix handling of a minimal case

This is to address the following exception:

org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [
        from com.redhat.rhn.domain.server.Server as s where s.id in ()
    ]