Fix gDependenciesToFetch[depth] is undefined