LPS-37190: synchronized method with race condition potential