Fixes #8420 and some clang errors.
Merge branch 'develop'