The login behaviour is expected; completion data is cached during login.
While you are logged in, any changes you make to completion data (such as obtaining a grade in the quiz, yourself) will be reflected immediately. But any changes somebody else makes (such as somebody grading your assignment) will not be reflected until next login. In most situations, you can't tell if somebody else has made a change yet or not.
I wonder if this is not acceptable. If it's not, we probably need to make a 'user cached data changed by somebody else' date thing (eg in user_preferences) which is checked every request and results in completion & grade caches being cleared. Or should the flag be per-course? Anyway that should be a different issue and would take longer to fix.
However, let's use this bug for your fix which I agree is right. I filed PULL-342 with this change. For future reference, at least unless they change the process, when submitting patches it's useful if you can create a branch specific to the bug & then give the details listed in the pull request (repo, branch, diff url). This one I just put it in my repo.