Merge pull request #1901 from gilmoskowitz/xtlocksBackport