JBIDE-15367 JBoss Knowledge Base Builder hangs up

Synchronization in DefinitionContext is improved.