I found the culprit: the very first call to com.canonical.Unity.Screen.keepDisplayOn returns a cookie with value 0, whereas oxide always assumes it will be > 0.
I found the culprit: the very first call to com.canonical. Unity.Screen. keepDisplayOn returns a cookie with value 0, whereas oxide always assumes it will be > 0.