Revert "Make template TypeError handling not so stupid."

This reverts commit 4dfba7c659f4c8bf040be4c27be6f0d00642da54.