Brexit legal advice warns of UK being trapped by Irish backstop