When a local function or class A creates an instance of a local class B capturing an outer variable 'x', it should use ref for 'x', but not the value of 'x'.