BUG: fix PeriodIndex join with DatetimeIndex stack overflow

closes #3899.