Test that deferred actions are executed in order