The use of WD40 can cause trigger malfunctions. If sprayed on thick and left long enough it becomes varnish like. The only solution isto spray it on thick again, let it soak a while (15 minutes) ten scrub it with a tootbrush. Afterwards spray with brake cleaner/gun scrubber and use CLP thereafter. I had "doubles" and slam fires with an AK until I cleaned that gunk out.
AR can double, and usually will, if the trigger has been worked on to make it lighter. Sometimes soon afterwards, sometimes years later, it will begin to double. I've replaced a hammer and fixed one for a friend. It seems the lighter the pull, te quicker the failure. They actually fire one round when you pull the trigger and another round when you release it. Fire your rifle very slow holding the trigger to the rear. Once recoil has ended and your sights are lined up again, release the trigger. That is your problem if it fires again.