BUG: remove static from function to avoid gcc-4.1 miscompile

gcc 4.1.2 (e.g. in red hat 5) will miscompile the function when
inlining. Without static it will not inline solving the issue.
Closes gh-5163