The logic is wrong - the first two bits should be exchanged: the /etc/lsb-release check is combined with the section for “without lsb_release”, which is probably where some of those things go wrong. But yes, I would say just not specifying version numbers would be most recommendable…