consolidate two copies of new style object header parsing code.