new_window: make `window` local

Otherwise `new_window` after `new_window foo` would re-use the same
name, resulting in an error.