[message cut]
Thanks, Juri, for helping again with this bug.
I attach an updated version of my patch, which uses an :options setting for display-buffer-alist so that the current behaviour remains the default, and runs a preoutput-filter-function which calls display-buffer only when output is added to an empty buffer.
I believe this addresses the performance and behaviour issues, without the need for another user option.
It is also rather shorter than the previous patch.