[libraries] Check the asset is valid before determining dependencies

4 jobs for improve_dependency_check in 4 minutes and 13 seconds (queued for 3 seconds)