I am working on a material for a candle, but I'm using the geometry input to get the Z value as a fac for a mix shader. 

I've already taken into account the objects position using the object info input, but I've realized that if I duplicate the object and scale it up or down, the material no longer works as it should.

Is there a way to get the objects scale in the material node editor to multiply the Z value by?