Fix BrowserLayer(allowTearDown=True)