Bug 3391

https://gist.github.com/swierol/472d2f149aa339124b74
Add a comment and explain, why do we need to set-up and tear-down the Flask context.