Multiple bug fixes for test_system_stl, and one new test for a particularly bad bug.