See comment about a more deterministic approach above.