In file templatetags/__init__.py there is a line:
__path__.extend(__import__(a + '.templatetags', {}, {}, ['']).__path__)
__import__ method as fourth parameters gets a list of symbols to import. If this list is empty, __import__ returns the top-level package, but if the list contains anything the specified package is returned as described in http://docs.python.org/lib/built-in-funcs.html . So in this file there is a hack where not empty list but list that contains 'something' is passed - list that contains single empty name.
But it causes some strange side-effects - the specified module is initialized twice. First with correct name and later with name followed by a dot (e.g. 'prog.app.templatetags' and 'prog.app.templatetags.'). In some cases it may cause serious problems.