This feature has behaved this way ever since if/elseif/else support was added over a decade ago. Fixing it will require changes to core scripting routines. I will add this to the to-do list for a future version.