Relating jet structure to photometric variability: the Herbig Ae star HD 163296