Added extra condition that triggers rebasing: if the baseline doesn’t contain all store ids, it rebases.