use right var in reporting exception in ref_update

Change-Id: I3b00a9c14c1f3993b0f1bf673cff28ae14030279
Merge "use right var in reporting exception in ref_update"