Strange inconsistencies in parameter changing across machines

I have a large script that among other things sorts objects by family and type and Length parameters, then assigns them a number from 1…n for parameter called “Mark” so I can have elements numbered in schedules.
It works on 2 machines but for whatever reason breaks on the other 2. Schedules generated by this script also break when project is opened on machine that has revit LT.
Here’s the script:

And here’s the broken result I am getting on this machine

It was supposed to give marks from 1 to n without repeating them. And the Element count matches the value count list so there shouldn’t be issues but there are

Never mind, forgot to check if using same dynamo versions. The machine not working was outdated