Fix shutdown order to respect creation order (important when running nepi-in-nepi)