Support both super and sub type constraints during constraint resolution