Fixed an old typo in the smarty extension and added a test case.