Fixes #3860 - automated discovery provisioning

Replaces https://github.com/theforeman/foreman_discovery/pull/97
What I mean is, I'm not against a transaction, I just want to understand if we need similar protection in other places where we use .becomes()