Re #6809. Implemented ClearMaskFlag.
Merge branch 'feature/6809_ClearMaskFlag' into develop