Improved locking to prevent a possible race condition in the DishwasherSimulation of fpai-devices