Consider the following:
f: nat -> nat
f(x) ==
let g: nat -> nat
g(a) ==
if a = 0 then 0 else a + g(a-1)
pre a > 0
measure a
in
g(x);
> p f(1)
Error 4034: Name 'measure_g' not in scope in 'DEFAULT' (test.vdm) at line 8:21
The problem is that the FunctionValue created by g does not include a measure function (though it does include a pre_g).