The correct fix is to have references throw an error when numified or stringified. Period, end of story. If you want to stringify a reference, use ref(). If you want to numify a reference, use ref_addr(). If you want something unique, use some combination of the two.
Solve the problem. Don't throw a random bandaid on it.
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?