Bug866824 - rebased on maser

rebase of pull #53