Php 1258 allow bootstrap other storage engines

Picked up parts of Hannes' PR, with fixes.