banish side effect dependent code
merge bug25721 into stable