Add specs to prevent dupe migrations_paths regression

[#50099107]

Add specs to verify that the duplicate migrations_paths protection
works.