When you use preceding-sibling it parses in opposite order as following sibling.
Ex.
last(),[2],[1],current(),[1],[2],last()
by default preceding sibling take the first preceding node so take away the [1] and it should work.
I just had problems with this, hope it helps.