The foul was definitely after he gathered!
We had a few discussions on this forum centering around the act of shooting and gathering the ball. I consistently argued that the gather had nothing to do with starting the act of shooting, but that sentiment wasn't shared by several posters.