You're right, slip of the keyboard.
But it doesn't change all that much regarding the problems.
However... I verified a few things and there is an advancement trigger which could be useful here:
item_used_on_block. The idea is to set up a hidden advancement which checks for this trigger, when it detects this it should verify the position of the player and compare that to the nearest broken portal. The only problem here is that Minecraft doesn't really know the concept of variables, but.. it might be possible to store the result on the scoreboard and then use this in a comparison somehow.
For example... when a player is near a ruined_portal to activate it they're always within 5 - 10 blocks away from it, which should be detectable with the
/locate command. If that checks out the portal can remain lit. If this doesn't check out then we might be able to use the rest of the advancement routine to apply a
/setblock to replace nether_portal with air which will then destroy it.
However... this routine is likely to fail on Spigot servers. On a vanilla server any function which gets executed through an advancement has admin privileges. So.. you could set up a routine that a player gets something whenever they access a certain area (I used this in the tutorial section of my server once). If's like an admin would have issues
/give <player> <item>. Unfortunately, for reasons way beyond me, Spigot changed this behavior to that the "advancement script" is executed as if the player themselves ran those commands. In other words: if you'd try to
/give the player something then the function would fail because a player obviously doesn't have access to the
/give command.
I don't know if this is still a thing, but this is how it used to be. A change in behavior which I always considered utterly stupid and narrow minded. Not only because it made Spigot incompatible with vanilla, but also because it makes no sense. If a player triggers a commandblock by pressing a key then those commands get run with admin privileges. If that same player triggers an advancement (something they have
zero control over) then the commands suddenly get run as the player themselves.
Anyway, 'tis a bit late here (time of writing) but I'll have a look tomorrow to see if you can "/execute store" those /locate results.