fix swap to check full mutability
Merge pull request #1603 from monarchdodra/swapFullMuable

fix swap to check full mutability