         var userInfo: [CodingUserInfoKey : Any] = [:]
 
         func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> {
-            assertCanRequestNewContainer()
-            node = [:]
+            if canEncodeNewValue {
+                node = [:]
+            } else {
+                precondition(
+                    node.isMapping,
+                    "Attempt to push new keyed encoding container when already previously encoded at this path."
+                )
+            }
             let wrapper = _KeyedEncodingContainer<Key>(referencing: self)
             return KeyedEncodingContainer(wrapper)
         }
 
         func unkeyedContainer() -> UnkeyedEncodingContainer {
-            assertCanRequestNewContainer()
-            node = []
+            if canEncodeNewValue {
+                node = []
+            } else {
+                precondition(
+                    node.isSequence,
+                    "Attempt to push new keyed encoding container when already previously encoded at this path."
+                )
+            }
             return _UnkeyedEncodingContainer(referencing: self)
         }
 
         func singleValueContainer() -> SingleValueEncodingContainer {
-            assertCanRequestNewContainer()
             return self
         }
 
         // MARK: Utility
 
-        /// Asserts that a new container can be requested at this coding path.
-        /// `preconditionFailure()`s if one cannot be requested.
-        func assertCanRequestNewContainer() {
-            guard node == "" else {
-                let previousContainerType: String
-                switch node {
-                case .mapping:
-                    previousContainerType = "keyed"
-                case .sequence:
-                    previousContainerType = "unkeyed"
-                case .scalar:
-                    previousContainerType = "single value"
-                }
-                preconditionFailure(
-                    "Attempt to encode with new container when already encoded with \(previousContainerType) container."
-                )
-            }
+        fileprivate var canEncodeNewValue: Bool {
+            return node == .unused
         }
     }
 

        // MARK: - SingleValueEncodingContainer Methods

        func encodeNil() throws {
            assertCanEncodeSingleValue()
            node = Node("null", Tag(.null))
        }


        func encode(_ value: Double) throws { try represent(value) }

        func encode(_ value: String) throws {
            assertCanEncodeNewValue()
            node = Node(value)
        }

        func encode<T>(_ value: T) throws where T : Encodable {
            assertCanEncodeNewValue()
            if let date = value as? Date {
                node = date.representedForCodable()
            } else if let representable = value as? ScalarRepresentable {
