I have had this problem many times. Even after making sure tags were correct and organized in correct folder and file naming. For a while I would just fix it manually. This post finally led to the solution