When you re-enter the alchemy lab (just click the alchemy room tab at the bottom of the mansion) the variable potselected appears to be reset and the potion list hidden, but the brew UI is still there and possibly enabled. If you click to brew or change the count you can get some errors. The following change seemed to work but I expect there's a much more elegant fix.
potselected = null
func _on_brewcounter_value_changed( value ):
if potselected != null && typeof(potselected) != 4:
I've no idea what that typeof clause is doing!