Changed way to find documents. This fixes bugs with contextsensitive views.