Reorder type visibility check
Reorder type visibility check

Checking the visibility before name is re-assigned ensures that nothing
nefarious (an actual type, like a pointer) gets passed to 'is_visible'

adamnew123456/spc,adamnew123456/spc