Merge pull request #859 from ianpartridge/swift-3.1-branch