Only show previous and next variables if the current variable is also on the list