ENG-4264: Yay code review.  Add a test case and a fix for a defect
nshi found.