Instead of an infinite loop, there should be an exception thrown. Granted this is an edge case, but probably should be handled.