When using Chinese civ, game seems to forget which dynasty you are in if you build extra landmarks out of order

So it seems like when playing as Chinese civ, you can build both landmarks as a civ bonus, but if I build landmarks from a previous dynasty that I did not build when still in that dynasty, it will roll me back to that old dynasty. So if I was in the Ming dynasty and built a landmark from the Song dynasty, I am now once again in the Song dynasty, even though I can still create units only available in the Ming dynasty. I can’t build the Pagoda anymore, though. I also lost the ability to create another granary, even though I had already built one.

Screenshots attached