demmt: derive program header type from header itself

SP.SELECT is not used for TEP and GP programs.