The problem is if the test is run via the browser, any of the variables checked in is_https might be set, so we'd have to store, then reset them all at the beginning of the rest, and restore them afterwards (including dealing with removing not-present values).

I honestly don't understand the issue with this change. It seems both trivial and uncontroversial, given we've already got alternate_base_folder and alternate_base_uri.