CORE-1423 NPE in ForeignKeyComparator