The install_struct.sql will rebuild the addons table, but it uses a unique constraint on the 'directory' column.It is perfectly fine to have a module in a directory 'abc' and a template in a directory 'abc'.