Fix potential out of bounds in locality graph code
Fix potential out of bounds in locality graph code

habanero-rice/hcpp,habanero-rice/hcpp,habanero-rice/hcpp,habanero-rice/hclib,habanero-rice/hclib,habanero-rice/hclib,habanero-rice/hclib,habanero-rice/hcpp,habanero-rice/hclib,habanero-rice/hclib,habanero-rice/hclib