enclosed uc_uid length OR statement to group the conditions to be properly evaluated together

This fixes the bug mentioned by dartajax in #626