Fixed crash in "headers" rewrite rule