Functions now only generate code if they are actually called.