Attempts to make shutdown 'painless' may stretch limits of federal law