Address after hook issues

This addresses a few issues I noticed when looking at the `after` hook code under consideration in #1769.

/cc @JonRowe