It's right. `LoggerProvider#putMdc` returns the old value BEFORE setting the new value. Since Log4j 2's `ThreadContext#put` returns `void`, we have to get the value first and THEN put it.

Note that this is exactly how it works with the `Log4jProvider`, too.