Answering my own question:
The bug was with hibernate envers with 3.6 that in some cases got in trouble with package names derived from estonian domain names (for example ee.codeto.foo). This hapened due to the fact that hibernate envers at some point during the building of query used "ee" as alias and in case full class names with packages were used (now always) then hibernate thought that the next part in package name after "ee" is a column name.
In later versions of hibernate this problem is solved. Probably not because this of estonian domain names but due to better alias usage. "ee_" is used instead of "ee". Therefore when you might be as unlucky to have a package with with "ee_" as the first part of the package name and happen to use hibernate envers and happen to use many-to-many mapping and happen to have the unlucky case that hibernet tries to use full class names with packages then there is this very minor chance that you may be inflicted by this bug.