Fixed #22738 -- made finer distinctions for when Boolean is not detected on Oracle

Thanks Claude Paroz for partial fix and Simon Charrette for review