I don't know what you mean by "vanilla powder", true vanilla does not come as a powder, but there is a variety of processed products which are used for vanilla flavoring and come in powdered form.
If your vanilla powder is made from pure artificial vanillin, or contains beta carotene, it can have an unpleasant aftertaste. I would suggest dissolving some of the powder into milk and drinking it that way, to see if the aftertaste is present. Don't use too high a concentration, this will be too strong, but you can make it more than you typically use in the yogurt.
If it is not the powder, everything else you mentioned could have been a factor. Try using a new batch of storebought yogurt as a culture. Change the container to something non-reactive, preferably glass. Make these changes separately, while keeping the other factors constant, to find out which one is the culprit.