Dealing with Endogeneity in Regression Models with Dynamic Coefficients