[bugfix] fix two edge cases in functionalization (#68269)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/68269
Test Plan: Imported from OSS
Reviewed By: mrshenli
Differential Revision: D32396357
Pulled By: bdhirsh
fbshipit-source-id: 1d374b693f3f526d027104cbdc08b8bbe9d38307