Fix core::optional<T> not being set to engaged after calling emplace