 
     ;; Pick among the remaining windows
     (when available-windows
-      ;; TODO: Look for an active one
-      (car available-windows))))
+      (let ((selected-window))
+        ;; TODO: Look for an active one
+        (setq selected-window (car available-windows))
+        (window--display-buffer buffer
+                                selected-window
+                                'reuse
+                                alist)))))
 
 (defadvice display-buffer (around jail-window-hook activate)
   "Handles jailing the window"
   (if (jail-windows/active-p)
-      (progn (let ((display-buffer-overriding-action
-                    '(jail-windows--display-buffer-override)))
-               ad-do-it))
-    (progn ad-do-it)))
-
-(defadvice display-buffer-other-frame (around jail-window-hook activate)
-  "Handles jailing the window"
-  (if (jail-windows/active-p)
       (let ((display-buffer-overriding-action
-                    '(jail-windows--display-buffer-override)))
+                    '((jail-windows--display-buffer-override))))
                ad-do-it)
     (progn ad-do-it)))
 

    (modify-frame-parameters (or frame (selected-frame))
                             `((jail-windows-options . ,options)))))

(defun jail-windows--prompt-for-layout (message
                                        &optional predicate initial-input)
  "[Internal] Prompt the user for a layout."
  (let ((choices (list (-map #'car jail-windows--registered-layouts)))
        (choice))
    (setq choice (completing-read message choices predicate t initial-input))
    (if (equal choice "")
        (car (car choices))
      (intern choice))))

        (if (-contains? regexp-list buffer-name)
            ;; When it does match, only use windows from this group
            (progn
              (setq matched-group t)
              (setq available-windows window-list))
          ;; When it doesn't, remove this group's windows from the list
