IDEA-114094 Search-replace in files does not happen if comments only is enabled
(cherry picked from commit 626bc985a489ed4c546cc150de87b92ba9f40501)