Preventing overspeeding of an engine by inhibiting improper gear selection