Fix self-loop bug in graph_draw()

8 jobs for master
Name Stage Failure
failed
job_gcc_py2_amd64 Test There is an unknown failure, please try again
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 663, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 676, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Sphinx==1.3.3' distribution was not found and is required by the application

ERROR: Build failed with: exit status 1
failed
job_clang_py2_amd64 Test There is an unknown failure, please try again
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 663, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 676, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 849, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Sphinx==1.3.3' distribution was not found and is required by the application

ERROR: Build failed with: exit status 1
failed
job_gcc_386 Test There is an unknown failure, please try again
  warnings.warn("tight_layout : falling back to Agg renderer")
/usr/lib/python3/dist-packages/matplotlib/tight_layout.py:222: UserWarning: tight_layout : falling back to Agg renderer
warnings.warn("tight_layout : falling back to Agg renderer")
/usr/lib/python3/dist-packages/matplotlib/tight_layout.py:222: UserWarning: tight_layout : falling back to Agg renderer
warnings.warn("tight_layout : falling back to Agg renderer")
/usr/lib/python3/dist-packages/matplotlib/tight_layout.py:222: UserWarning: tight_layout : falling back to Agg renderer
warnings.warn("tight_layout : falling back to Agg renderer")

ERROR: Build failed with: exit status 1
failed
job_gcc_py2_386 Test There is an unknown failure, please try again
Doctest summary
===============
860 tests
1 failure in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 138 warnings.

ERROR: Build failed with: exit status 1