The code change there in hrm ticket prevents buying when an building is already obsolete during the turn. It can't do anything for the typical case that building has been bought, gets obsolete during the turn change, and then bought shields count toward new target. So the rule would not be really consistent.
#45938 is about more general bug of being able to buy "unavailable production" (not only when the reason of unavailability is obsolescence).
Likely we just fix that "superset" and this specific case gets the behavior that follows from it.
From https://www.hostedredmine.com/issues/921933 by Ilkka Virta: Prevent buying an obsolete building.
As part of #43200, this has also been posted to http://forum.freeciv.org/f/viewtopic.php?f=14&t=92066