Cleanup namespace handling in the SQLTransformer (at least a bit). More samples are desperately needed for testing. Fixes bug #25203, #31634.