Fix the encoder for selecting RPL idx when the max distance between current pic and ref pic never be greater than GOP size