This problem can be described by reference to XQuery use case strong/q12. The query contains a path expression billTo/zip. The static type inferred for billTo is Address, and the type address does not allow a child named zip. However, a type that is derived by extension from Address, namely USAddress, does allow such a child.
In analyzing the path expression Saxon recognizes that zip can occur, and refrains from issuing the warning that would be output if zip could not occur. However, in calculating the static cardinality of the expression, it fails to take the types-derived-by-extension into account, and infers a type of "empty-sequence()". This can cause cascaing effects, for example if the path expression appears as the condition in a conditional expression Saxon will assume that the condition is always false.
A source fix has been produced (affecting code that is in Saxon-SA only) and will be included in the next maintenance release.
The reason this slipped through testing is that I had assumed all the use cases were exercised by the W3C XQuery Test Suite. It appears that this is not the case for the STRONG use cases. I will try to get this remedied.