Added more tests to show the details of #2018

Repro for #2018