LPS-38018 Solve by reverting fix for LPS-37846

Reverting b5bae9763758789 because it causes problems in some environments