If you filled it with the heater valves open and the heater blows hot air, I'd suggest you dont have an air bubble. Confirm if it is indeed a HG problem by sniffer test, compression test + checking for mayo under the oil filler cap and colour of oil. AFIK, the E39s have an aluminium block. If the engine overheats it can pull the studs out of the block wrecking the threads. So you are looking at a new block or drilling out the holes to take inserts. So if the indications are that the head gasket has gone, I'd start by trying the tighten the head bolts. If they spin, then unfortunately you have your answer