The Core::System::create_jail function already provided the new jail index as a result, so it was just a matter of using it when calling the LibCore join_jail function to use the new jail.