Change in ovirt-engine[master]: core: Fix bug in discard checks