fix exception "ActiveRecord::ConfigurationError: Association named 'INNER JOIN..." when merging relation with String joins