Ensure pre/post deploy stuff happens in defined order

Closes: DE7411