Redmine#5225: do not cache remoteclassesmatching due to class setting side effect