backport from trunk (rev #9969):
fixed the contact removel when using the force registration flag with limited number of contact.
- Credits to Kiss Karoly for reporting and assisting with the debugging / testing
- Closes bug id 3610662 on SF