shlib.sh: make has_forks_with_alternates smarter