For some reason*, EE parses advanced conditionals (conditionals that include if:else or if:elseif blocks) differently than simple {if}{/if} blocks. The latter’s contents are parsed if and only if the condition is true; the former’s contents are parsed no matter what, and the decision to display or not display those contents is made very, very late in the template parsing process.
So how did that affect your situation? Basically Reeposition saw TWO {reeposition:item} tags, whereas you assumed it was only seeing one. (One if segment_3==”“, the other if not.) Since Reeposition doesn’t know what to do with multiple {reeposition:item} tags, it just chose one of them to deal with—the first one it came across.
There are two ways to deal with the problem. One is to do what I had you do and use simple conditionals. It makes your template code a little uglier, but it’s more efficient (EE only parses the content of one of the blocks instead of both of them), and it helps out Reeposition in this case. The other option is to use assign each of the reeposition:item tags a unique ID (i.e. {reeposition:item id=“hello”} and {reeposition:item id=“world”}) ... but I don’t think that’s ideal in your situation.
I’m not sure how good of an explanation that was. Let me know if I can clarify.
* I don’t say “for some reason” to be snarky. I really don’t know. I’ve never looked into the reasons behind the decision to have two different behaviors.