After *Completions* buffer has been displayed and then popped down when
working in interactive shell, the original window configuration is not
restored. For instance:
C-x 1 (display a single window)
C-x b *scratch* RET (switch to *scratch*)
C-x 2 (split the window)
M-x shell RET (run shell)
C-9 C-x C-^ (enlarge the shell window)
TAB (display completions)
SPC (pop down *Completions* buffer)
Instead of returning to the configuration with the shell window
enlarged, Emacs displays equally split windows.
Note that window configuration is retained properly in similar
situations e.g. in eshell or in command completion after M-x.