Fixed (#841)

This is a fix for #841 and supporting test.
on a side note, I always found it annoying it's being called "theory". It's a test with inline data, that's it :)