Fix bug where defaults weren't actually being used.

@defaults was always undefined due to scoping issues, so defaults were
never actually used.