Foreign funds sell off $800 mn in equities in 4 sessions, despite Nifty rally to record high