BT Qid 39b(43) :^כי היכי דלא ליתי^ לידי הירהורא : so that he should not arrive at thought(s of idolatry) See the entire entry for hrhwr v.n.Q disturbing thought