Generate unique elements in an array

This is about specifying the hard coded values in unique constrains as shown in below.

class nibbleset;
rand bit [3:0] nibbles[10];
const rand bit [3:0] excludes = {0,15};
rand bit[3:0] excluded;
constraint uniq {unique {nibbles, excludes,7};}
//constraint uniq {unique {nibbles, excludes,excluded};}
constraint exclusion { excluded==1; }
endclass

We are seeing the error as shown in below for the above code snippet(uncommitted line ).

Error-[CSTR-NET] Non-equivalent type
customer_test.sv, 18

If I replace the value 7 with an identifier(excluded) the test case is passing.

The following blog was mentioning about the hard coded values in the unique constraints is allowed .

Is this valid to mention the hardcoded values in the unique constraint list ( constraint uniq {unique {nibbles, excludes,7};}