Why does this work, but the commented out line above cause an error?