Work around compiler bug by making trait public