Worfklow buttons from modal dialog propagated to the main screen

Let’s have a simple main screen based on final screen of a workflow.

If a modal dialog with workflow buttons (next and cancel) is opened, main screen in the background shows them as well.

In this case the workflow buttons on the main screen shouldn’t appear.