Forgetting to include app_config_id in a mongo query is an easy mistake to make, and we keep making it. It goes undetected as things appear to work, but you end up fetching the wrongs docs from mongo, and bad things happen.
Investigate possible ways to prevent this mistake. One approach would be to automatically add app_config_id to every query unless the caller explicitly says otherwise.
Gave this a go but it's complicated - not a high enough priority to pursue right now.