check all levels of ec-hierarchy for match

script now checks all levels of an ec code for a match to encode the
targets, e.g. for the code 1.2.3.4 not only 1.2.3.4 will be an active
microlabel but also 1.2.3, 1.2 and 1 (and R for the root node being
always active)