[Issue 9861] Read-only databases can't be opened - regression introduced with da0527ac