Fix N2C defect MAGN-787
Merge remote-tracking branch 'upstream/ChocoButter' into ChocoButter
Add regress test case of MAGN-781
Merge pull request #792 from ke-yu/ChocoButter

The changes look fine to me (with some assumptions from my side). In the interest of having this tested earlier, I am merging this in.