fixes #5771 - lifecycle-environment - fix the behavir of prior environment

In order to see this fix for environments that do not have
a prior (e.g. Library), the following hammer-cli change
will be needed:

https://github.com/theforeman/hammer-cli/pull/107
Merge pull request #172 from bbuckingham/issue-5771

fixes #5771 - lifecycle-environment - fix the behavir of prior environment