Undecidability of weak membership theories