Wow this is still happening!
I had it with my dad's iPad, he is 80 and has Alzheimer's so the code was 0000 easy to remember and he has hardly anything on it, he just likes to have it. So I knew the code wasn't wrong. I was going to reset it but thought I'd just keep trying for a while.
Now its happened on my iphone6s ....... sigh .... I've been putting off doing an update on iOS - and kept saying later, I wonder if it's angry at me. I've tried turning it off and on again a few times, I've tried plugging it into iTunes, but it just says it needs the passcode which still doesn't work. So I'm hoping to just leave it a while, and keep trying. It seems that worked for some. I haven't updated for a few weeks so yes it will be annoying to have to restore because of an apple bug.
Wouldn't it be nice if after 3 years we could get some answers?