shorten_unambiguous_ref(): introduce a new local variable