Fixing deadlocks during free_component.