You misunderstand both how binding 'taking into account' is, and also how the 'agreement over dinner' is afforded the same weight as a treaty under the Vienna Convention on treaties.
Whilst any law on the planet can be challenged in court, this agreement has no more vulnerabilty to being...
As I understand it, those referendums were about treaty changes ? ???
They were not about the decision to leave the EU.
I'm sorry but I just do not see how voting to leave the EU, is actually voting to stay and negotiate different terms.
Please point me to the confirmation that leave means...