#2560
This is a hotfix. In the future we'll create a Flag validator and prevent storing nil IDs in the first place.