debuginfo: Clamp the maximum dwarf version to 3

This is a consequence of #13611 and our bots running a "fairly old" gdb which
doesn't understand the newer versions of dwarf.