Fixes in handling BEFORE dependencies

 - if a job is already running the BEFORE dependency becomes irrelevant