This is exactly how evolution works though. The genetic makeup of an individual organism doesn't change according to its environment. Only the offspring can have different genetic makeup which can be for better or for worse - this is where natural selection comes into play.