MT#8329 make allowed_clis also contract preference.

(cherry picked from commit 5c3a8e1f504b10c86984e437d5b1652b50cf6d9e)