Fixed a bug for checking loop denpendency.
Fixed a bug in 3D spacemap for finding neighbour BlockeEntities.