Forbid non-constant initializers for static fields in compact classes

Fixes bug 636509