Fix infinite loop in items test when no categories are available (in case of store maintainance for example)