JBIDE-15321 ConcurrentModificationException in KbBuilder

Required synchronization is added.