 			}
 		}
 
+		// If the last argument seen was an option key, make sure to include it.
 		if let key = currentKey {
 			untouchedKeyedArguments[key] = ""
 		}

				continue
			}

			if let key = currentKey {
				untouchedKeyedArguments[key] = arg
				currentKey = nil

		var positional: [String] = []

		for arg in arguments {
			// If this is a keyed argument...
			if permitKeys && arg.hasPrefix("--") {
				// Terminate any open keyed argument without a value.
				if let key = currentKey {
					untouchedKeyedArguments[key] = ""
					currentKey = nil
				}

				// Check for -- by itself, which should terminate the keyed
				// argument list.
				let keyStartIndex = arg.startIndex.successor().successor()
				if keyStartIndex == arg.endIndex {
					permitKeys = false
