Improved trivial input handling in dba merging function.