Since I found it hard to follow the code to guarantee this assumption, I figured it wouldn't hurt to add an additional safety check. If you consider it fine as is, please feel free to reject this MR.
PS: I'm a bit hesitant to mark stuff as false-positive in coverity, just in case I'm wrong...