LPS-40048 Keep previous logic in place. Removing the ThreadLocal has changed it