LPS-32967

LPS-32967 - fix with the test, also fixes LPS-33256