BMW 318

I have a 1998 bmw 318ti mileage 107,603 California emissions compliant, automatic transmission with steptronic.
Recently I changed out my cat converter and both O2 sensors. I used after-market, direct fit replacements. I did not have a CEL before the change-out but the material inside the cat was broken up and rattling loudly enough to profoundly disturb me while driving down the road.
The check engine light clicked on after about 10 miles with the new cat and O2 sensors, the codes were P0135 and P1186 respectively.
My mechanic says there's a dead ground wire in the post-cat sensor harness and something about possible issues with pin #1 or #30. The snap-on guy happened to be there that day so, we hooked up his portable $9,000 scanner and the scanner indicated that the O2 sensors were working perfectly, along with everything else. A tailpipe sniff confirmed this but unfortunately, Taxachusetts doesn't allow this option anymore, CEL's are an automatic failure.
On my own, I pulled out the DME and changed the the #527 relay sitting next to it and promptly wrote down all of the numbers displayed on the the DME, for future reference of course however, the CEL still persists.
I have until 03/08 so for now I'm doing the black electrical tape thing to soothe my frazzled emotions.
Do you guys have any idea what the problem could be? I'm taking any and all suggestions at this point.

September 16, 2007.

The first thing I would do is put my old sensors back in, regardless of the snap on scanner's opinion. The O2 sensors are funny animals, moreso on the BMWs. Sometimes only OEM ones work.(Don't know why? )

Vacuum leaks are a common source for the po code, but the light wasn't on before.

I agree with Service Writer.
Reinstall the original Oxygen sensors, then find someone with the ability to reset adaptations in the DME
The 318 always was a difficult smog. Repost if more assistance is required

Dr. Hagerty
Sep 16, 2007.