Add failing test reproducing issue #1015.

I was able to reproduce issue #1015 with some C code finally, and I've added it to the tests.

Note that this test is failing, so it may not be appropriate to merge into master yet, but this would likely be helpful to someone trying to troubleshoot the problem and know when it's fixed without needing a QML or Ruby environment to do so.

If I am able to solve the issue, I will add that commit to this branch at that time.  Otherwise, hopefully this work will help someone else to solve it.