Fixing Itemid discovery for views without an ID in query