Checking for and updating existing records on post

This could be down to how you've named the set value step. Again I think mine was a similar use case/ issue and took a while to work through (with some valued help from @mebeingken ).

Try adding a global name of PriorityValue to both the Set Value steps, and then change the name of the steps to PriorityValueInitial and PriorityValueUpdated (or similar).

This has to do with the scope of access of the variable in each step, by making it global it can be accessed within the repeat too (or something along those lines!). By just using the name field it may be only the initial PriorityValue is accessible (I'm sure there a technically better explanation than that but hopefully you get the general idea).