Fixing queries (adding access_url_id) see BT#6195