Reorganise the functions doing wfProfileOut and returning on all if branches.