#1263: Updated test case to include another scenario which broke existing code and fixed associated bug.