Adjustments to avoid a strange bug where gcc can't find a template type as a static member (hopefully)