I've run into this problem and I've gotten much better at estimating. Solution? You should schedule your sprints exactly by degree of difficulty (in descending, not ascending, order). During my design phase I focus on what the hardest problems are and always schedule my sprints to do them first. If you've abstracted away your planned functionality well enough you should be able to isolate that problem and go there first, no matter how much other functionality is intertwined with the feature. That way as you go further along in the project it gets easier, not harder, to meet your deadline.