Automatic detection of related context