MDL-38225 - data: Database entries are now linked correctly.

This was a regression that was fixed in the 2.x versions but not 1.9