Fix access to document folders inside sessions: Add first check on session doc, then check on course doc - refs BT#7128