Prevent NPE when pedantic encounters dupe top-level deps to fix #1498