Feature/jmg multithread fix

This is the revised commit, removing all the merge weirdness. I've tested it on our OpenStack cluster and it works fine, providing the Vagrantfile template is changed to comment out the hostname (which is an issue separate from this fix)