Merge branch 'bug_3714' into 'master'
Fix for bug #3714
See merge request !117 (merged)
(cherry picked from commit 76e64f52)
Since the original merge request (!117 (merged)) was reverted (!133 (merged)) - this merge request needs to be reapplied. @andrii has a fix for the missing part related to the python-slurm backend (!165 (merged)).