import from mercurial as of changeset: 9635:6d4158ff7b82
Update from HG changeset 9669:c5b24e8ed428