JBIDE-15637 JBoss Knowledge Base Builder hangs up

Synchronization in DefinitionContext is improved.