Fixed concurrency problem while removing multiple gates and signals at once.