Store type ids in a static BTreeMap
Store type ids in a static BTreeMap

static variables inside generic functions are shared between all
instances of the function, we can't use that for storing our generated
type id.

sdroege/rsplugin,sdroege/rsplugin