Re #10647 All collected together
Re #10674 This should fix it
Merge branch 'bugfix/10674_hardmaskOpt' into develop