Fix potential NoSuchElementException on Nil.head

No test included because I had no idea on how to reproduce the behavior
in a test - the exception occurs for me only in a misconfigured compiler
but not in a correctly configured one.
Merge pull request #48 from sschaef/t-fix-potential-no-such-element-exception

Fix potential NoSuchElementException on Nil.head