Add test case for #8776

Authored by cactus on Mar 14 2014, 9:34 AM.