Add POP_SUB before exiting subroutine when the MPI group is not root. This was failing for MPI and was not caught by the buildbots because the feature is used in a long test.