An ergodic theorem for read-once non-uniform deterministic finite automata