Fix nil deref in spool command

Occurs when no module is currently `use`d
Land #2159, spool command nil dereference fix