Log Message: apply note creation bug fix from the go mercurial head, and adjust our code so that it works in both cases.