generalize the handling of decorated headers and level resolution