Minor reordering of code
Fixed static version of neighbour() (see ceylon/ceylon-compiler#1700)