Adding self contained test case for reproducing seg fault