https://github.com/TextureGroup/Texture/pull/743 Manually merged since I forgot to retarget that diff onto master before merge