Added ancestor query and insertion to make sure quries always returned strongly consistent results