This one is quite interesting. Because the package.toml file for the kea package doesn't specify a build command, it defaults to running dpkg-buildpackage -uc -us -tc -F against the cloned git repo. This is a problem because, by default, dpkg-buildpackage runs tasks in parallel (the limit is defined as auto, but seems to be based off the number of processors the system has), and there's a component being compiled in kea that other make tasks rely on, but ends up sometimes not being built in time for the dependent task to run successfully.
The easiest fix here appears to be adding a build command to kea's package.toml that specifies the additional argument -j1 to the original dpkg-buildpackage command, which reverts dpkg-buildpackage's behaviour to serial execution of tasks.