Now it works!
I thought I had tested it without the change to the core file, and with the full URI in the base_path, and I thought it had still given me the error under that circumstance. But I just double checked it and now it’s working without the change to the core config file / site_uri() function. So changing only the base path has done the trick.
Thanks very much! Seriously. I’ve seen some complaints on these boards but my experience with CI has been great.