Fix up to use the correct name during deployment.

The legacy mechanism used the package name instead of the legacy app name (defaults to the same, but can be overriden - as frontend have done).

This passes in the package so that the original name can be used and also tries to make the code in the ASG filter a little cleaner.