### Symbolic limit computation

Suppose W(t) is a function of t, and h(t,z) is a function of t and z. Define X(t,z) as follows.

var('t,z')
W = function('W',t)
h = function('h',t,z)
X = 2*diff(h,z)(z=W)^2 / (h - h(z=W)) - 2 * diff(h,z) / (z - W)

Now, I want to compute the limit of X as z tends to W(t). I have tried the command

limit(X,z=W),

but this does not work. I guess a simpler example is the following.

var('dt')
limit((W(t=t+dt)-W)/dt,dt=0)

Sage does not give the "right" answer, namely the derivative of W.

Any suggestion/comment is welcome and appreciated.