After I joined the merchant's guild (Tingalf had already been arrested), I could ask Trevor if there was anything I could do for him, and he brought up a suspected black market dealer. I completed the quest by saying he had already been arrested. There was a speech option listed early (as I recall, I could tell Trevor that Tingalf had been arrested before he brought the subject up), but I don't know if skipping to the end of the conversation would cause a problem.
I bought suff from Tingalf (a ring and maybe something else), and didn't have a problem.
Beyond Divinity is divided into 4 acts, so it should be much harder to do quests in an unexpected order.