lax.scan doesn't catch aliased mutable array refs the way jit does
lax.scan doesn't catch aliased mutable array refs the way jit does: a task in MiMo-V2.6-RL-harbor-code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). jax.jit already validates that you don't pass the same mutable array reference in twice, and that a ref isn't both closed over and passed as an…
The task
`jax.jit` already validates that you don't pass the same mutable array reference in twice, and that a ref isn't both closed over and passed as an argument — you get a nice `ValueError` explaining what's wrong. But `lax.scan` doesn't do any of this checking, so the same mistakes either silently produce wrong results…
Part of FineEnvs/MiMo-V2.6-RL-harbor-code.