Better condition on before-migration state

The original condition would not work with latest foreman fixes