So does the way that Walgreens have their loyalty card set up with Apple Pay also compromise the security?
Almost certainly not.
To explain, the post I replied to thought it could be linked to a payment card to avoid barcode scanning. Ie every time I use my Halifax debit card, Tesco knows it's mine and knows my club card account is linked.
Apple Pay relies on tokenisation, which means a random string unique to that transaction. There is no relation to the card number or to the next token in the next transaction. As it is implemented, linking the two would be impossible and setting up some way of reverse engineering it would seriously undermine the security of the system.