The RAF fly the Grob 109...if the headwind component is over 15 knots a turn back is recommended if you have 300'. That said it has a glide ratio of 29:1 as opposed to 10:1 for most light aircraft.
This SLMG had to perform this manoeuvre on many occasions as the RAF version had a major problem with EFATOs.
As with most things in aviation very few are black and white. Agreed in general terms it is not a good idea to turn back ...but it is situational.
As bookworm? pointed out if you have the height and have taken off into a headwind a turn back may well be a more sensible option. I once had an instructor who said at 2,500 feet it would be better to crash land in the built up area straight ahead than to turn back.
He had taken the impossible turn argument married it with a picture he saw of a guy who crashed on a house and walked away!