Hi Laurent,
we identified and fixed the problem today - thanks to your test case. Feel free to checkout our git sources [1].
The next latest stable snapshot will also reflect the changes [2], but I'm not exactly sure when it will be released. We might move this task up on our todo list ...
Regards, Lukas
[1] https://github.com/BaseXdb/basex [2] http://basex.org/products/download/all-downloads/