Fix: PE: Correctly handle demotion of grouped masters that are partially demoted
Test: PE: Correctly handle demotion of grouped masters that are partially demoted