You will note that I advised NOT "reading about Madison," but rather READING MADISON. Read from the horse's mouth, not some idiot historian's opinion.
When and where did Madison offer the quote you gave, because here's one that occurred in 1832, when Madison was finished with government, retired on his plantation. This is part of a letter to Rev. Jasper Adams, with whom Madison conversed by letter several times:
"The simple question to be decided is whether a support of the best and purist religion, the Christian religion itself, not so far at least as pecuniary means are involved, to be provided for by the government rather than being left to the voluntary provisions of those who profess it. The existing character, distinguished, as it is by its religious features, and the lapse of time now more than 50 years since the legal support of religion was withdrawn, sufficiently to prove that it does not need the support of government, and it will scarcely be contended that the government has suffered by the exemption of religion from its cognizance or its pecuniary aid."
If, in fact, your quote is accurate, obviously in later years he had a falling out with "a wall of separation."