Refactor collocated reference block checking process Factor out common codes. Change-Id: I9889422212daedfedf934067c4c4945a0c1de351