Autorestoring previous pane zoom in tmux

Excerpt from a message I sent to tmux-users mailing list:

I just began to use the recently added zoom feature and came across an anoying thing.

You have panes A and B. A is zoomed, if you switch to pane B, then A is forcibly unzoomed. This is expected, of course, otherwise B would remain invisible.

If you switch back to pane A I expect to get A zoomed again because it wasn’t me who unzoomed it.

I submitted a patch but upstream disliked it. I admit that a secretly zoomed pane somehow violates the rule of least surprise.

See it in action: