Add a test case for bug 864780