don't pass ended state to children

instead, wrap the callback.

first, bad practice to pass around mutable state
second, otherwise f151c1f7a5fe2746124fae081f253521395e7c58 causes the
callback to get called twice sometimes: once when the redirect gets a
response, and once when the first-level callback things it has timed out