(Hevc/GenerateRefList): Fixing bug when modifying both refList.