[api] fix crash when removing a package under release tracking