What am I doing wrong?
This looks very, very strange. And honestly I have no idea right now how this happened. But I'm also not sober enough right now to look deeper into it...

The only thing I noticed at a first glance is that your original image contains weird meta data. Looking at the tags model, manufacturer, software, bits per pixel and DNG version, I would expect "Canikon", "Canon", "Magic Lantern", 14 and "1.3.0.0", whereas your file reports nothing, nothing, "Rarevision RAWMagic 1.0", 16 and "1.1.0.0".
What's most striking is the difference between the "normal" 14 bit color depth and the 16 bit in your file.
So, frankly speaking, your source file doesn't seem to come straight from a 650D. Is that true?
My program is somehow tailored to the 650D-files. Maybe this is part of the problem.