brush masks: fix insertion of nodes