Terror mastermind obtained visa to visit Australia, government admits