Sorry, my bad.  I forgot to mention that the handler should be installed with SA_NODEFER (in addition to SA_RESETHAND) for that to work.