fix gres topo array index

Logic used to identify cores which are usable with each GRES weas incorrect.
bug 905