fix refs to pkg.compare

This fixes #3492.