That's a bug, if you can make a reproduction of the problem (rebuilding the database from a script) then please file an issue on github (https://github.com/duckdb/duckdb/issues) so it can be fixed