Fix index calculation in neighbours expression.