What matters when a funeral only becomes present during a prohibited interval?

Prohibited and Disliked Times for Prayer: Rules and Differences