Even if this is not interlining and is simply online IB-IB, it is on separate tickets (having nothing to do with PNR's) and thus, won't check the bags to LHR. I would also point to the risk of missing the second ticket and being stranded at MAD having to purchase a new ticket if there is any appreciable delay, even if one does not check bags.