Bug or feature - UserEvent not recognised inside RemovingAnimation

I have a piece of code which used to work, but now reports no UserEvent found: ShowSidebar, where ShowSidebar is the name of an event I’ve moved to the very top of the app UX, just for debugging purposes.
The same event triggers just fine from code just above this one, referencing the ActivatingAnimation and DeactivatingAnimation triggers.

It used to work several versions ago, so something definitely changed. Wondering if it’s the intended behaviour.

Relevant code:

<!-- Disable sidebar -->
    <WhileTrue Value="{Property this.SidebarEvents}">
        <ActivatingAnimation>
            <RaiseUserEvent EventName="HideSidebar" />
        </ActivatingAnimation>
        <DeactivatingAnimation>
            <RaiseUserEvent EventName="ShowSidebar" />
        </DeactivatingAnimation>
        <RemovingAnimation>
            <DebugAction Message="removing" />
            <RaiseUserEvent EventName="ShowSidebar" />
        </RemovingAnimation>
    </WhileTrue>