Improved Flask-Babel detection.