Remove unneeded clone for Remote validity test.
Fix issues reported by CodeAnalysis (NRefactory).