Johna,
Easy way to avoid the bag problem...
On international flights, a connection must be within 24 hours to be a through fare. So just make the LHR-MAD segent the next day, within 24 hours. This way, you will check your bags to LHR where you will "spend the night."