Revert some potentially dangerous changes which are not needed anymore.

Refs #5116