in the time when sauron cast beren into the pit a weight of horror came upon luthien 's heart ; and going to melian for counsel she learned that beren lay in the dungeons of tol-in-gaurhoth without hope of rescue .