Table prefix was added twice

If a table prefix was set in the database config, this code caused the prefix to be added twice: once here and once in the call to the database engine inside `DatabaseSessionHandler`. refs #4580 on the correct branch.
fix conflicts.