Throw NoSuchElementElementException

There's also an unrelated change.