This needs to throw an exception as this is not expected to happen. On the other hand, finding a proper place to add the information should take O(1) time and making this check superfluous.