Don't forget the operator precedence!
Code:
(MAP.TILES)[ty] = [...]



Always learn from history, to be sure you make the same mistakes again...