Fix GRES bug with Types

Fix bug with GRES having multiple types that can cause slurmctld abort.
This can be reproduced with select/cons_res and one Gres like this:
Name=gpu Type=kepler File=/dev/tty0
A bad index was being used that caused an assert.