There were to identical if statements and the second one was followed by an else branch. While in this case (if statement just throws) it is not a bug, this commit cleans up one of the if statements.