fix #25793 See PR #918, thanks to @BartlomiejLewandowski