Revert [#30556] JDatabaseDriver::replacePrefix: Optimization