Fix handling of missing options hash in #attach