masks: fix braindead bug that has caused an excessive number of nodes for brush strokes