Fixed Java instance-of to work with brands.