Have a look at 1.163-8T(j). That explains what to do with reallocations and has a couple of examples.