This is because when you run then separately dgraph creates new uids for _:alice etc., The second time around. You will find that after your to separate runs, there will be two nodes for Alice, one has the properties and another the edge.
Running them together ensures that the same id is used for _:alice (as dgraph will only fetch an id once per transaction - I think).
Manish just added a mechanism to retrieve uIDs and use them instead of :_ … You might want to check that out… I think it’s part of 1.0.8.
You are performing two operations separately. Dgraph will always understand that you are adding new information when you use _: BlankNode. The correct is, perform the first operation and then the second you use the UID generated by the first.