Fix accessing of headers directly

Fix for Issue #3353