Builder: Fix #1051 required attribute generation

Thanks to @Gyvastis for bringing this to our attention. Please let me
know if there are any further issues with this fix.