pdiff + tellsimpafter behaves differently inside function



Dear all,

I am trying to rewrite some things using pdiff, so I first load(pdiff). 
When I then enter the code below as separate statements on the command line in 
maxima, tellsimpafter will work and simplify the expression to g(1). However, 
when I place it inside a function, it will complain, saying:

tellsimpafter: pattern must not be an atom; found: h1
#0: test()(test.mac line 6)

here's the code:

test() := block([expr,f,g,df,h1,F],
  expr : diff(f(x), x)*g(y),
  F(xx,yy) := at(expr, [x = xx,y=yy]),
  df:diff(f(x),x),
  h1:subst(1,x,df),
  tellsimpafter(''h1,1),
  print(F(1,1))
)$


I also tried switching off debugging stuff from a maxima function using the 
lisp function from Robert Dodier, but that didn't work, so I guess this is 
something else (btw, Robert, thanks for the fix!). Does somebody know what 
goes wrong here?

Best,
NB