Given two compatible observables $A$ and $B$ with a common eigenbasis, the completeness relation is: $\newcommand{\ket}[1]{|#1\rangle} \newcommand{\bra}[1]{\langle#1|}$ $$ \sum_{i,j}\ket{a^i,b^j}\bra{a^i,b^j} = 1 $$
Since $\ket{a^i,b^j}$ is not guaranteed to exist for all combinations of $i$ and $j$, does the sum imply we simply ignore the terms which don't exist?