Could you please add a short comment here about the intended behaviour of `update_value`.
I have not taken this PR for a test spin, but the guard clause here feels a bit off to me.. does it really do what you want?

That is, it will accept calls to this branch when `CurrentModule` is `undefined` or `CurrentKey` is `undefined` or `CurrentModule` is not `Module` or `CurrentKey` is not Key.