Make thread operations public and check access, fixes #765 (commit: 77e66ac)
Use correct error location for ambiguity errors, fixes #767 (commit: 6206481)