Fix bug with generic static initializers not invoking the static initializer