Doubling of invariant curves and chaos in three-dimensional diffeomorphisms.