Operating system: Ubuntu 18.04.1
Graphics card: RX 480
Open the file twice
Short description of error
Drivers that use modified namespaces only work after reloading twice blender files with the same internal script.
Exact steps for others to reproduce the error
I made an empty with saturation and hue object properties, these properties are later plugged into a light's RGB values using drivers, (in this case, for cycles and eevee), for this purpose a script is used that adds an entry to the driver's namespace to convert hue and saturation into RGB. I make sure this script is registered and that blender auto-runs python files.