Product out of stock message for variation is not correct

When attempting to add a product to a cart that has one of its
variations out of stock the message that is displayed tells the customer
that the main product is out of stock rather than the specific variation
being out of stock. Message changed to use title of current product id
rather than title from post of parent product