Re-revert r173342, without losing the compile time improvements, flat
out bug fixes, or functionality preserving refactorings.