Prosperity is, as far as my observation goes only a factor for the Taxes ammount and for the reload speed of troop availability for recruitment.
No this bug is only caused because of negative production and no protection against completition falling into the negative.