@Gargron Please look at issue 20673. It's got a lot of noise but good work on how the logic for this could work. See my comments (buried somewhere near the middle at this point) for good summary.