Reconsidered, better to handle per-function state in the constructor as before. This reverts commit 98e474c1.