Based on the original code, for composed permissions of the same permission type (in the format of <perm> - <mode>) we can only add one permission select. I think we can use a simple table to avoid adding duplicate selects for a permission.