Correct behaviour with global and local databases.
Something strange... I think I do not understand closures...