A pattern definition device (7, 7') for use in a charged-particle multi-beam processing or inspection apparatus, said device comprising an aperture array field (af) configured to be irradiated with a beam (lp) of electrically charged particles and allow passage of the beam through a plurality of apertures thus forming a corresponding number of beamlets, each of the beamlets traversing the aperture array field (af) along a respective beamlet path through the pattern definition device and extending downstream of the pattern definition device to a respective nominal path for each beamlet, the pattern definition device (7, 7') including an aperture array device positioned across the aperture array field (af) and a deflection array device positioned across the aperture array field (af), said aperture array device comprising said plurality of apertures in the aperture array field, which apertures are configured to define the shape of the beamlets formed in the pattern definition device, said deflection array device comprising - a plurality of blanking openings allowing passage of beamlets through the deflection array device, and - a plurality of deflection devices (521, 501), each of said deflection devices being associated with a respective blanking opening and comprising at least one electrostatic electrode (522, 523, 502), the deflection devices being selectively activatable and configured to influence, when activated, the beamlets traversing said respective blanking openings so as to deflect said beamlets by an amount sufficient to divert said beamlets off their nominal paths, except for one or more defective deflection devices which are permanently unable to deflect the beamlets traversing blanking openings with which the defective deflection devices are associated, thus leaving such beamlets (b') as "non-deflected beamlets", the pattern definition device (7,7') further comprising a filtering device realized as a plate-shaped device comprising - a plurality of passage openings realized as an array of openings which correspond to the plurality of blanking openings of the deflection array device and which allow passage of beamlets through the filtering device for at least the beamlets passing through blanking openings of the deflection array device where the respective deflection devices are not defective, and - a plurality of obstructing devices (71, 74), each obstructing device being associated with a respective opening and comprising at least one electrostatic electrode (72, 73, 742, 743), wherein each obstructing device is programmable to take two permanent states with respect to at least one of the non-deflected beamlets (b'), namely, an open state not affecting the respective non-deflected beamlet(s) and an obstructing state, wherein the obstructing devices are selectively activatable to realize the obstructing state by diverting the beamlets traversing said respective openings from their nominal path, thus preventing the respective beamlets from traversing the pattern definition device (7, 7') along their respective nominal paths downstream of the pattern definition device for a minimum duration, characterised in that the paths of all those beamlets, which pass through blanking openings of the deflection array device where the respective deflection devices are not defective, are not affected by said filtering device. - a plurality of blanking openings allowing passage of beamlets through the deflection array device, and - a plurality of deflection devices (521, 501), each of said deflection devices being associated with a respective blanking opening and comprising at least one electrostatic electrode (522, 523, 502), the deflection devices being selectively activatable and configured to influence, when activated, the beamlets traversing said respective blanking openings so as to deflect said beamlets by an amount sufficient to divert said beamlets off their nominal paths, except for one or more defective deflection devices which are permanently unable to deflect the beamlets traversing blanking openings with which the defective deflection devices are associated, thus leaving such beamlets (b') as "non-deflected beamlets", the pattern definition device (7,7') further comprising a filtering device realized as a plate-shaped device comprising - a plurality of passage openings realized as an array of openings which correspond to the plurality of blanking openings of the deflection array device and which allow passage of beamlets through the filtering device for at least the beamlets passing through blanking openings of the deflection array device where the respective deflection devices are not defective, and - a plurality of obstructing devices (71, 74), each obstructing device being associated with a respective opening and comprising at least one electrostatic electrode (72, 73, 742, 743), wherein each obstructing device is programmable to take two permanent states with respect to at least one of the non-deflected beamlets (b'), namely, an open state not affecting the respective non-deflected beamlet(s) and an obstructing state, wherein the obstructing devices are selectively activatable to realize the obstructing state by diverting the beamlets traversing said respective openings from their nominal path, thus preventing the respective beamlets from traversing the pattern definition device (7, 7') along their respective nominal paths downstream of the pattern definition device for a minimum duration,