(Maybe) fixed setting number of references in working memory activation
event to a negative value in some cases.
Many bug fixes. Among them: Sqlite uses two different indexing schemes.
One starts at 0. One starts at 1. I finally figured that out.