ISPN-5096 Avoid NPE beans when scanning for duplicates

https://issues.jboss.org/browse/ISPN-5096