Fixed race condition in BuildInitializeRelatedMethod