More efficient lookup of steps, and more informative error message when not found.