Improved stable tag discovery and updated docstring [skip ci].