Neil,
The problem with poor selection of 4th gear on late Dragonflies is quite common and can be rectified by fitting a couple of thick shims. The problem you have with 2nd gear could be caused by the nut on the rear of the layshaft being loose - allowing the layshaft to move forward. My advice would be to remove the plate with the gearchange on it. Firstly remove the pointer so that you leave the selector quadrant in place when you take off the cover plate. Inside you will be able to see the gears and check the depth of engagement of the drive dogs. With a large screwdriver, you will be able to turn the quadrant to engage each gear. 2nd gear is engaged when the rear selector fork moves forward, causing the sliding gear to engage with the dogs on the layshaft. If the layshaft can be moved fore and aft, then the nut on the back end will be loose. This can be accessed by removing the final drive assembly from the opposite side of the 'box.
Turning the quadrant further clockwise will engage 3rd and top gears. Top gear is selected when the front fork moves forward - engaging the sliding gear with the back of the input gear. On some Dragonflies, the mesh is not deep enough, causing it to jump out again when under load. If this is the case, I'm afraid the gearbox will have to be removed to effect a repair.
The gearbox can be removed without taking out the engine - providing you remove the toolbox and the swinging arm pivot bolt (with the bike on the stand, of course!). This will create enough room to pull the 'box away from the engine. On the front you will find a 'figure 8' alloy plate held by 6 x 1/4"BSF nuts - remove this plate along with the input shaft (you may have to rotate the shaft to line up the layshaft gear with a cutaway in the input shaft). Next remove the clutch coupling (it can be very stubborn), then remove the 4 countersunk screws from the retaining plate on the other side of the plate - the input shaft can then be removed (be careful - it runs on loose 1/4" rollers). Next, warm the figure 8 plate to assist removal of the outer bearing track and backing washer, then produce a shim 1 to 1.5 mm thick to fit behind the washer. Insert the shim before replacing the washer and outer track, then make a shim of the same thickness that will fit over the protruding outer track and the same shape as the retaining plate. Then reassemble in the reverse order of dismantling. This modification will set the input shaft back by the thickness of the shim - giving deeper engagement of top gear without affecting the mesh of any of the other ratios.
This may sound complicated but it will transform the gearbox - and there aren't any other 'nasties' when dismantling the front of the 'box.
Good Luck and regards,
Eddie.