Added new test case "Defect_MAGN_3166" to verify the fix