Merge branch 'bug_7731' into 3.12-master