Actually, I shortcut around iterating the entire array. The actual line is....
if vm.effect.productivity and vm.limitation and vm.limitation[kr] then
So first it checks if the module has a productivity effect.
Then it checks if it has limitations (its possible to have a Productivity Module without limitations, and bobs has a setting that makes use of that).
Then it checks if one of those limitations is the recipe (kr) it is already looking at. There is no need to iterate over each entry in the limitation array, since we already know the exact key we are looking for.
That being said, I will look into this, but I will point out that I don't receive notifications about these discussions, so they are not monitored.