Fix up for bug 10178

Treat side effect correctly
Merge pull request #2083 from 9rnsr/fix10178

Fix up for bug 10178