Like the endings of several of his films, the trajectory of M. Night Shyamalan’s career contains a shocking twist. After…