friendly only covers the WFYABTA redline, other redlines may still apply. i can't tell from your "If ever a Civ has known you for a while, and doesnt hate you, and all their techs are red in the trade screen then you are probably at the WFYABTA limit. If you hover over the red tech it will say why." whether you actually did hover and you did specifically see the WFYABTA there or not.
you mention chemistry ... maybe what you wanted to trade for was engineering, and they were trying to build Hagia Sophia? in that case, the redline would be "We Have Our Reasons". that means they're building the wonder and aren't going to let you have the tech until they're done (or lose the race to build it), no matter how much they like you. i can't blame them, i act the same way.
another possibility is something like "we're not ready to begin trading this tech just yet". means they consider it too much of a monopoly so far to share it with you, no matter how much they like you.
you may have already known that, i can't tell how much you understand about the whole WFYABTA thing. you keep mentioning the +17 -1. the actual numbers don't matter a single bit. all that matters is the word Friendly. the numbers just give you a sense of how easy it would be to stay friendly if you have to do something to irritate him a bit. but the AI himself doesn't care whether you're at +9 or +300, if he considers you a Friend you're a Friend and there's no such thing as Friend/Good Friend/Best Friend. well, until you get into voting for UN ... but for WFYABTA, you can ignore the numbers, it's all in the words.
as DaveMcW suggested, the best way for us to help is to upload a save. without that we can only guess.