fix #24580: Incorrect masking of fret mark