Fix #80 - Added support for ancestor queries.

CC reviewers: @kleyow @proppy