Swing die setting race condition

http://jenkins.buttonweavers.com:8080/job/buttonmen-blackshadowshade/52/

Note that this pull request is based on pull request #435, so it should be approved after it.

Fixes #316.