Yes, in fact originally all free kicks were indirect. The first mention of free kicks was in 1872, for handling offences. The law stated that a goal could not be scored from such a free kick. In 1874, free kicks were added for offside, tripping, hacking, holding and pushing (all still indirect)...