Various things encountered during search for source of heap corruption