In `debug' don't try using window on inaccessible frame (Bug#17170).