This bug report only applies to eXist-trunk (up to rev. 13519); eXist-1.4.x is fine.
If the self axis is used in full, eXist incorrectly throws error XPST0005, and exits with messages like:
Compilation error: err:XPST0005 Error while evaluating expression: collection('/db/coll')//test/self::*. Self::element() called on set of nodes which do not contain any nodes of this name. [at line 107, column 25, source: String]
The accompanying XQuery Unit test file (selfAxisTest.xml) illustrates the problem:
-only the full self:: axis specifier throws the error: abbreviated syntax is fine (successful tests #1, #4)
-the problem occurs independent of the name test (wildcard vs. name test) and context (outside or inside a predicate) (failing tests #2-#3, #5-#6)