As I said above, the first time someone put two words together in a set order, there was "grammar". So of course there was "grammar" in the 15th century - and in the 10th, and in the 10th BC and in the 300,000th BC, and since people started talking. just look at the sentence you quote - there are loads of grammatical rules evident - the SVO word order of the second clause,the use of the indefinite article before the noun and not after it or omitted, the transformation of sting to stung to indicate past time, . Shakespeare could have written :
sting serpent I a but didn't, because it wouldn't have meant anything. It breaks a host of grammatical rules which everyone follows and therefore becomes indecipherable.
However, the "rule" you pick on is different. It is one which is trotted out in all the grammar books, but this time the rule does not describe what people say but what certain "authorities" think people "should" say. And as your quote shows, this was a lost cause even in Shakespeare's time. People often use this type of subordinate clause, where the subject of the non-finite verb (here, sleeping) is not the same as the subject in the main clause. The grammar mavens would object that the subject of
sleeping is "really"
a serpent. But no one would ever interpret the sentence like this. The meaning is fully clear and retrievable - and so people are going to go on using this construction regardless of what anyone writing a grammar book might "decide".
Grammar is not the opinion of worthy gentlemen who decide what "should" and "shouldn't" be said - it's a set of rules based on the "description of what is actually said.
Stick to descriptive grammars for your account of the language and avoid prescriptive ones.
Avoidance of this type of sentence is often advised as a stylistic rule for written English, but simply because it can either make meaning unclear or lead to unintentionally funny consequences :
If properly secured, you shouldn't be able to remove the cover./ After being beaten, the cook boiled the egg. But there's a big difference between a stylistic rule and a grammatical rule. And, as Shakespeare shows, you can often get away with it anyway.
This particular rule has been discussed before incidentally - see here :
I don't know what to title this one