Fix locking for _properties initialization

The check if _properties collection is initialized should happen inside the lock.