The reason it is being written to everytime is that on every iteration of the upper loop, the current value is being to the value signalling property node, which is causing the event to fire every time in the lower loop.
As a first suggestion, compare the new value to the old value, and if it is the same, don't write anything into the value signalling property node. You could do that with shift registers in the upper loop.