ensureInitialized was throwing away a new encoder every call. Fixed that.