Get the bases from the proto class if it exists (ROOT-6487).