See #759, probably I didn't run dialyzer after fixing this function's spec.