Issue 9459 - Front-end does not detect invalid array operations

Move the error into the frontend, by attempting array operations.

https://d.puremagic.com/issues/show_bug.cgi?id=9459