** We currently have a 50' run that includes two 90 degree elbows. The inspector said that the maximum length for a clothes dryer is 25' with 5' subtracted for every 90 degree elbow. **
The maximum length for a dryer vent is usually defined by the dryer manufacturer and does very greatly (see the following link) between brands and models. In fact Whirlpool does (or did) have a model specially designed for use with an extended length vent but your current length is pushing it for most regular models. I hope it is at least rigid metal ducting and not any kind of flexible type?
I've never heard of code mandating certain lengths but I wouldn't put it past the government.