remove obsolete header parsing code
assert guards against cross-module stack leaks