Minor tweaks for working with other windows and detached nodes.