fix reported but unreproducible "infinite loop", RT#26101