Conditionally amend filter if uids present