Integrating https://github.com/mapproxy/mapproxy/commit/f0bf4424c4d7c080dd33782904386aa0fda43bb1