I added a true/false switch to enable/disable the relative urls in roots_config.php. Relative urls are enabled by default.
I moved the conditions that previously triggered the relative urls functionality to a new function enable_root_relative_urls() which returns a boolean true/false.
I replaced the conditions i moved by a test for enable_root_relative_urls() true/false value.