Issue 1366 - ensure_dependencies.py checkout fails for master revision

--HG--
extra : histedit_source : f6112fc8345b725f8b63029c2b986c78ee3dbcbb