Add local to variable 'activated' in function mapRemotePath