Fixes to work around G09 segfault