Simple read of local variable uses double type.

Upon return from the function, ScalarDoubleImpl is still used to pass
the test. Next step is arithmetics.