Fix up for bug 10178

Additional change for #2082.

Treat side effect correctly.