fixed initialization of newly created topics
resolved some indexing issues
updating only word types that actually occur, to avoid some exceptions
skipping deletions when there is only one active topic for this word type
worked around a case where reversed p1/p2/p3 are different from forward ones