Prevent double triggering of ARRIVED and DEPARTED messages. This fixes some test cases, although some test cases still fail.