Fixes #17045. Whenever a phase is overridden, the pre- and post-hooks for that phase must be invoked!