Fixes and speedups for unaliased type checks
Catchup with SVN