smurf: Do not attempt to access non-existent AST models
smurf: The smf_calc_wvm cache is a permanent memory allocation

So enclosing it in a astBeginPM/astEndPM block so that it is not reported
as a memory leak when using AST memdebug.
smurf: Fix various memory leaks
ndf: Fix memory leaks

Not real leaks, so just stop them being listed as dangling memory blocks