Fix symbols with different display name

Note: I'd like to keep the commented tracing code for a while.
I wonder that we should create a `Array.replace: int -> 'T [] -> 'T []` function? We use this pattern quite often, it would be good to encapsulate side effects in a function. Alternatively, we could always use `Array.mapi` in such situations.