Should this code prevent a dupe `sid`, `mask` and `flags` entry from being added?