Fix a problem with initialization.

We were accessing ivars before 'self' had been set, which
is potentially dangerous.