Fix #10050

My proposed fix here solved the problem for me as I described in
http://musescore.org/en/node/10050#comment-76478
I couldn't reproduce it using the steps given by chen lung in
http://musescore.org/en/node/10050#comment-48291

Since this is related to threads, exact reproduction could be difficult.