SONAR-5945 Fix NPE when having issues on deleted resources