I just discovered that when my house was built  the toilet drain was a 12 inch rough in but because 2x6s had to be used for the stack and other pvc pipes it pushed the wall out another two iches. I discovered this last weekend when I gutted the bathroom during renovation. I pulled the toilet and wondered why the sewer train was set back from the toilet flange. Darnest thing. Then I realized that the plumber somehow used what looks like a huge piece of [lead I guess] pipe and made a custom two inch pipe that leads from the flange misplaced sewer. I bet that the rough in plumber never knew that 2 x 6s were being used behind the toilet.
Anyway, long story short...there is a way around that problem. Whether it's code is another story. Good luck.