There's often a rule about not wishing about wishing, either directly or indirectly. This rule's not in the story of Aladdin (at least, not Disney's version) because that would prevent what happens with Jafar at the end.
It's also not a rule in Douglas Hofstadter's book Gödel, Escher, Bach..., where Achilles and the Tortoise - characters Hofstadter frequently borrows as protagonists; his Tortoise is sapient and can talk - contrive to wish that a wish not be granted, or something like that.
And if that last paragraph (with its nested asides) gave you a headache, you'll love the book.