For some reason f78cd1e043 introduced an unrelated change - perhaps a merge error. Removing this change fixes the nil pointer problem.
f78cd1e043