Dark/Light mode not updating via nested variables

I have a Figma library (let us call this “A”) that is added to another library (let us call this “B”).

In A, I have defined some variables, such as what colours to use when switching the design from light to dark mode. I have utilised the colours and tokens from A inside the designs in B and subsequently inside designs that use these from the B library.

Variables in A ← B ← Designs

But suddenly, I can no longer switch from/to dark mode using library B, although I can use the associated Tokens from within both B and its associated design files. Nothing happens when I switch from light to dark in either B or its related designs. But it all still works fine in A.

I should mention that all files and libraries are up-to-date/exported, etc.

Does anybody know why this could happen?