OK, I don't want to argue with you as you are the boss here. :)
But I -  as a programmer - would never put a custom (override) function into an include file that will be overwritten on next update.
And a config file is the right place for everything configuration related and this time the custom function belongs to configuration as it's content completely depends on the actual site where it is run.
After all I will go with my workaround by using require_once() to include my custom function config file.

My thought was that maybe I found something nasty. But as Tom pointed out in another e-mail this functionality is on purpose, so it's a feature not a bug.
So sorry for wasting some peoples' time, my mail was born with good intention.

BR,
Tylla

On 2016-02-23 22:09, Adam Armstrong wrote:
includes/functions.inc.php would seem to be a sensible place.

A config file is certainly not the right place to define code, and whinging at other people when it causes things to break is not helpful.

adam.

On 23/02/2016 21:08:15, Nagy Attila <tylla_at_memetic.org@tylla.hu> wrote:

OK. Then what's the recommended place of custom_rewrite_location() function?