fixed remaining issues to pass test_ogrsf