Fix cases where we assign an object to a prototype member globally instead of in constructor

I scrubbed the code after seeing #7485 and found a couple more cases where I had done this accidentally.