When importing layers from the layer index we actually want the branch name/correct git ref in the "commit" column in orm_layer_version. Rather than the SHA (which is actually just an implementation detail for the layer index to tell if it's up-to-date with HEAD).
Uploaded for review on poky-contrib: adamian/20141215-development
Fixed in master.
Verified on master: 6ae933b75c1c34a9d39e1aff0a0cb26a7ce4677f