The current code wrongly assumes that versions[0] will always exist after the iterateAndFilterByVersion call.
@expect