Fix sanity check when using APP_SQL_DBPORT.