Fix soft-apply detection of migrations with dependencies