Test that we get correct index on detach events for addressable ports