Fix deadlock caused by cyclic data-dependency.