Fix tests broken by move of exceptions.