Add testcases for issue #275
Will be squashed once valid fixes merged