[jan] Don't use LIKE search on inventory ID field (Bug #12976).

And don't build empty search criteria.