Integrated improved UUID support from master branch.