[Parser] Dependency should be checked by idMap's id, not depth