weightp: fix hash mismatch when --ref > 3

--HG--
branch : stable
WeightPrediction: Do not use lowres MV/MVcost for invalid MVs/MVcosts

--HG--
branch : stable
Merge from stable