Fixed missing change in recent refactoring, causing plater crash. #1298
Workaround dclone() not being thread-safe
Merge branch 'master' into xs