The first pick makes 'the picklist' where the subs start picking from.
Pick Hotkey with ID = loopindex <-------- the picklist contains now that one Hotkey
Hotkey Assigned is not -1 <----- picks from previous picked list (containing the hotkey with ID=loopindex), if it exists the new picklist contains a hotkey with ID = loopindex and Assigned =not -1, if it dont exist the new picklist is empty an no matter the action that follow ... they have have no Hotkey to work with
Lets assume Assigned = not -1, now the picklist contains 1 hotkey with ID = loopindex and Assigned =not -1
now you set current to the loopindex
Pick Hotkey with ID = current <------ since current = loopindex, that hotkey is in the previous picked list, it is an unneeded pick, but yeah it works
Pick Hotkey with ID = current - 1 <-------- the previous picked list is not ever containing that hotkey, it contains only the hotkey with ID = current, since it dont exist in the previous picklist, the new picklist will always be empty and the condition untrue
So, concluding, the pick hotkey with ID = current is totally not needed, it is picked already.
To make the pick Hotkey with ID = current - 1 work you first need to make a new picklist that contains that Hotkey.
Or use a 'pick all' before that condition, or use a function (a function always starts picking from scratch)