On the validity of Taylor’s hypothesis for wall-bounded flows