For large raster's, generating the topographic contours can be overbearing on system resources and often result in an out of memory issue. To alleviate this I have run the Generate Topographic Contour script against a grid index. The underlying script enforces a buffer based on the chosen scale or will default to buffer by 5 kilometers. When the script is run across a gridded raster like this there will invariably be an overlap of topographic contours along the grid seams.
The only work around that I can think of is to run each grid, clip based on AOI and then merge all the grids back together again.
Alternatively, if the buffer range could be set as an optional parameter this would alleviate the need to clip and merge.