Type constraint fixes for card, len, mk_() and set ranges