Backport PR #5503: check explicitly for 'dev' before adding the note to docs

allows 'maint' suffix (or similar) for the maintenance branches, so they don't get the note on every page.