Improvement on fix for LT-15112

* Builds on 96e05a9c5eb1895d2f946c150e1f2ff0a78e37d3
* Allows testing of fix for LT-15112 and slightly better
  error reporting.

Change-Id: I669817c6514f96d7c5dff1aa5748f55f14091dea