I don't know if chickens dream NFD, but I don't see why not as I know dogs have them. Wing flapping can be a balance issue cause by an ear infection or some neurological problem, but in my experience it isn't accompanied by screams. Anyway, it would be constant or regular and not every few weeks. So my guess is she is having a nightmare, based on her experience. Hopefully she'll get over it before she injures herself. All you can do is give her plenty of attention to make her feel secure, even if it means her sleeping in the house.