There is definitely no rule like that. A Schengen visa can be used to enter any Schengen country, not only the country that issued it (see Should my first trip be to the country which issued my Schengen Visa?).
Furthermore, article 5 of the Schengen Borders code on “entry conditions for third country nationals” provides that:
For intended stays on the territory of the Member States of a duration of no more than 90 days in any 180-day period, which entails considering the 180-day period preceding each day of stay, the entry conditions for third-country nationals shall be the following:
(b) they are in possession of a valid visa, if required pursuant to Council Regulation (EC) No 539/2001 of 15 March 2001 listing the third countries whose nationals must be in possession of visas when crossing the external borders and those whose nationals are exempt from that requirement ( 18 ), except where they hold a valid residence permit or a valid long-stay visa;
A long-stay visa like yours is therefore a kind of “drop-in” replacement for a Schengen visa. It exempts you from the Schengen visa requirement without adding any other condition. Legally speaking, you are effectively in the same situation than someone who does not need a visa in the first place.
Furthermore, the same article also includes this:
- By way of derogation from paragraph 1:
(a) third-country nationals who do not fulfil all the conditions laid down in paragraph 1 but who hold a residence permit or a long-stay visa shall be authorised to enter the territory of the other Member States for transit purposes so that they may reach the territory of the Member State which issued the residence permit or the long-stay visa, unless their names are on the national list of alerts of the Member State whose external borders they are seeking to cross and the alert is accompanied by instructions to refuse entry or transit;
That is, far from forbidding it, the Borders code explicitly envisions that someone with a residence permit could enter “other Member States” and even exempts residence permit holders from some requirements in that case so that it's actually easier for them than for visa holders.
So ground handling personnel was simply wrong, no doubt about that. But that's one of these situations where you are at the mercy of the person in charge of enforcing the rules.
Unfortunately, your recourses are very limited. Conceivably, you could start some sort of civil lawsuit against the airline and/or ground handling company and demand that they cover all the costs you incurred but that seems very uncertain and not worth the trouble. Alternatively, as suggested in a comment, a polite request to the airline's customer service might get you some goodwill gesture and help them revise their procedures.
Your idea to try to shame them on social media is also a good one. One regular user here has had much success with this strategy (specifically on Twitter), airlines are often keen to avoid bad publicity and more responsive that way.