Packaging fixes

A few packaging fixes, mostly related to in-tree tests.