I made an error in my previous python component and didn’t call sc.doc = ghdoc at the end. I was frustrated though, because adding it in didn’t seem to effect the error. But I just did a test with a simple script and adding sc.doc = ghdoc at the end of a script released it. I think it was just a computational order error.
Unless you are saying that it should work despite a python component calling sc.doc = Rhino.RhinoDoc.ActiveDoc without adding sc.doc = ghdoc? In which case it does break the HB components.