It did work by luck before, but now it works no matter what the template tables say. Add tests for the other error cases and internal data assertions.