Wasn't sure where to post this but I'll post it here as a lesson to all. This is probably explained in the docs but regardless, I want to make this clear to everyone.
trigger1 = e|| (var(5) := var(5)&1023)
Is not the same as this:
trigger1 = e|| (var(5) := (var(5)&1023))
In the first instance, you're setting var(5) to itself, then taking the bitwise AND of the first 10 bits. This means you're setting var(5) to itself and essentially doing nothing. In the second instance, you're setting var(5) to the first 10 bits of var(5), like you were probably trying to do like I was.
This order of operations goes for any bitwise operand, including OR and XOR.
Do not make this mistake that I made.