Elide lock acquisition if class has already been initialized

Speeds up object allocation.