This can happen if the model contains NaN, which could be the result of any mesh loading plug-in.
It's likely to fail elsewhere too, but hopefully we can handle that there once we get a Sentry bug about that then.
Fixes Sentry issue CURA-404. Sentry issue not found.
Before this change packages were only being checked if they were bundled after loading the package_id. However only installed packages were being loaded so this would always be false.
The solution here is to check first if a material file is inside "secure_paths" (these are install directory resource paths). If it is, it must be a bundled material.