Bug fixed in element expressions with side effects

Element expressions with multiple indexes had a bug where the left-hand
side of the expression was evaluated multiple times. Example:

p[x, y];

This would cause ‘p’ to be evaluated twice. When ‘p’ is an expression
with side effects (for example, a function), the result of p is stored
in a temporary variable, which is then used in the element expression.