better originator header detection

fixes #1640
tweak resharper settings