Worse! With that code you either get:
compilation-set-window-height: Wrong type argument: window-live-p, nil

That makes sense, since the buffer was not actually displayed it has no
window. Should compilation-set-window-height or the calls to it check
window-live-p instead of assuming the buffer has been displayed?

Or if you s/ignore/'ignore/, then you get a separate frame that
occludes your work!

Right, 'ignore is just (quote ignore), which is interpreted as setting
the special frame's quote parameter to ignore.

Thanks for an intriguing suggestion, though.
Note that the error isn't with grep, it's with next-error.

So M-x compile and M-x grep ought to display the *compilation* and
*grep* buffers, but next-error and previous-error shouldn't. Does
advising them to preserve the window configuration do what you want:
(defadvice next-error (around save-window-excursion activate)
"Preserve the current window configuration."
(save-window-excursion
ad-do-it))
(defadvice previous-error (around save-window-excursion activate)
"Preserve the current window configuration."
(save-window-excursion
ad-do-it))
--
Kevin Rodgers