swap order of spree inventory config check to avoid extra db queries

Rebased as requested!