The assumption is that the site database should always be available, since web sites are up and running 24 hours a day. So if the database is inaccessible, that's considered a critical error needing administrator intervention, so it redirects to the setup page. I don't know of any way to accomplish what you want to do without forking the code. We don't recommend forking, since that will make it very difficult to upgrade in the future.