Note: I haven't done this, I just read a lot.
IIRC the breakpoint for 1030 Volvo diffs is 3.54:1, so you should be able to change the crownwheel and pinion matched set from your 245 in your 164 (they are both 1030 type diffs), and use the 164's original carrier.
AFAIK 140 diffs were either 4.1:1 or 4.3:1.
The 240 diffs are shorter and have different trailing arm mounting brackets to 140/164 diffs.