Fix logic when TraitsUI isn't available.