On the local symmetries of gravity and supergravity models