Only extract naxis if a NAXIS header is present.