LPS-50556 Unsafe type conversion leads to java collections error