                       (with-current-buffer buffer
                         (setq window--sides-shown t))
                       (window--display-buffer
-                       buffer this-window 'reuse alist dedicated))
+                       buffer this-window 'reuse alist))
                  (and (or (not max-slots) (< slots max-slots))
                       (or (and next-window
                                ;; Make new window before `next-window'.

                        (with-current-buffer buffer
                          (setq window--sides-shown t))
                        (window--display-buffer
                         buffer best-window 'reuse alist dedicated)))))))))


;;
;; Emacs backwards compatibility

(unless EMACS26+
  (defvar window-sides-reversed nil)

                      (with-current-buffer buffer
                        (setq window--sides-shown t))
                      (window--display-buffer
                       buffer window 'window alist))
                 (and best-window
                      ;; Reuse `best-window'.
                      (progn
