Fix for bug #28172 (“wfGetDB called when it shouldn't be”).