Remove pointless branches found by dialyzer.
more precise spec
appease dialyzer
suppress no_return warnings
give in to dialyzer
merge bug26087 into default