Fixed edge case where no ID's are present for IN statement in tagging scope