                       (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 window 'window alist dedicated))
                 (and best-window
                      ;; Reuse `best-window'.
                      (progn

         (slot  (or (cdr (assq 'slot alist))  0))
         (vslot (or (cdr (assq 'vslot alist)) 0))
         (left-or-right (memq side '(left right)))
         (display-buffer-mark-dedicated (or display-buffer-mark-dedicated 'popup)))

    (cond ((not (memq side '(top bottom left right)))
           (error "Invalid side %s specified" side))
