Verify server provider matches project when switching documents

The server provider is not automatically updated when switching projects, so we need to detect that case.