Fix another use of className that could cause init order issues

Fixes #996.