I'm using the latest standard install of LS 2.1.2 std with PHP LSapi on a debian machine.
When the index file is not typed in the URL, PHP_SELF does not include the index filename and the dirname function returns a path one folder up. I've set up examples.
That's because the PHP_SELF is set to '/home/' instead of '/home/index.php' in the second test case. We will change it in next minor release to make LSWS behave like an Apache as much as possible.