More post-bind/unbind logic back into Java.

Pre-unbind removed entirely, it was unused.