Add diagnostics and a test for a case which fails on run.pivotal.io