Why is this doing the asme thing in both the `if` branches?