Fix case where a missing `dynamic/1` directive would not be detected