acceptance tests for issue #4038