Though it's hard to give a specific answer from the details you've given, I suspect you're running into an issue with Yoast's indexables. This can happen when syncing data between environments. I'd check out the Yoast Test Helper plugin and use that to reset the indexables table.