Remove strange compatibility code

It breaks the LocalProxy pattern, which is used widely in Flask applications.