Minor cleanup, including DB-5522 to handle region detection safely