fixed cached packages always rebuilt
fixed build loop when building more than one package