Hi,
you issue is, you are mapping the default AP-system profile to both the AP-groups.
Create two AP-System profiles,
AP-system profile 1 : LMS- Master IP, Bkp LMS - Local IP
AP-System profile 2 : LMS - Local IP , Bkp LMS - MAster IP
Now map AP-System profile to AP-Group1 and AP-System profile 2 to AP-group 2
Please feel free for any further help on this.