Merge branch 'bug_8365' into 3.12-master