This certainly needs to be improved, which I plan to do in a followup that reduces the number of element lookups we do. We should find the element once, and then wait for it not to be displayed. I just didn't want to hold up this big improvement on that optimisation, as it will be fairly significant itself.