Add test for value of ref to scalar.