BUG: core: consider both C and F order buffers as contiguous
Merge pull request #3828 from charris/backport-1.8-3827

Backport 1.8 3827