Merge branch 'bug_8781' into 3.12-master