There is a hole in your explanation.
"In sentences where the indirect object is represented by "a + pronoun", and it is at the beginning of the sentence...."
but you do not explain what happens if "a + pronoun" is at the end of the sentence.
Is the indirect object pronoun required or optional in that case?
eg: Can "Me lo ha comprado a mí." be written as "lo ha comprado a mí."?