Implement stronger guarantees for mutable borrows

Implement the stronger guarantees for mutable borrows proposed in #12624.