Merge "[Refactor] Make uid owner match comparison logic into a function" into main