opkg_cmd: fix endless loop in whatprovides/whatreplaces