Issue/12444 namespace exceptions

Fix #12444 

@bantu @DeepDiver1975