Backport of PR #4354. Use word disc for TEC and TID instead of layer (printouts and file names...

...); cosmetics in legends.