This scope uses URLs for its department IDs. The URLs change depending on a "limit" setting. So to reproduce, go to the settings , change the value to 21 from 20, then go back and pick a department. You will see that the shell is passing an old department ID with the original limit of 20 in it.
While I do think it's probably bad to set the department IDs like this, it should still work.
This still seems to be happening. We have a scope now which highlights the issue:
lp:~unity-api-team/+junk/missing-dept-scope
This scope uses URLs for its department IDs. The URLs change depending on a "limit" setting. So to reproduce, go to the settings , change the value to 21 from 20, then go back and pick a department. You will see that the shell is passing an old department ID with the original limit of 20 in it.
While I do think it's probably bad to set the department IDs like this, it should still work.