Fix database selector issues as found by @niklaka ProcessWireTests per issue #157