Add array bounds checking in h_Enumerate