As shown in the link below, the rear wheel bearing itself is no. 2
The driveshaft flange listed on eurocarparts as 'e39 rear hub' is part no. 1.
The procedure for replacing the wheel bearing indicates that you need to pull off the flange, which f*cks the bearing - then you need special tools to remove the remaining bearing bit from the flange, etc, etc....headache.
So, what I'm thinking is get a new bearing and new flange. Unbolt old wheel bearing/flange assembly complete.....refit new one. Job's a good 'un.
The TIS procedure (not including the section for faffing about removing bits of the bearing from the flange) ->