[api] fix handling of broken linked packages