Merge (r1400578) from trunk HDFS-4022. Replication not happening for appended block. Contributed by Vinay.