Local regularity of the value function in optimal control