Safe Third Country Agreement ‘no longer working as intended,’ memo reveals