Issue #16696: fix comparison between bytes and string. Also, improve glob tests.