Ensure actions are handled in a deterministic order (#11735) (merged
from #11432 in 6.8 branch)

svn changeset:25867/svn branch:6.8

Change-Id: Ie34cc4c4fe6524a23b2e7692b9e73a421443ac4f