Controversial temple to be rebuilt