I've spun off #7172 to consider ripping this code out eventually