I added in a reference to bug#28937, which I just reported. Fixing that would fix also fix this bug, but that solution might not be ready for Emacs 26.