As pointed out by @hagenw in #467 (comment) it is possible that a call to Database.update() changes the tables in the databases that are passed to the function. This is probably caused by this line.
Since this is not an expected behavior we should at least document it.