fix #5904, assertion failure running pipelines

must be careful using functional constructs where side effects are needed
Merge branch 'master' of github.com:JuliaLang/julia