The S&P 500 is flashing a warning signal that was last seen in the dot-com era.