[BUGFIX] Prevent sorting incomplete loaded packages