Fix ID ordering of first two elements in det table Refs #6262

It turned out to be an undefined order in which the iterator was being
incremented and dereference in a chained function call.