Make the width slightly less than the parent component by enough to not cover the scrollbar. Maybe even have the alignment code check if there are scrollbars first and only shrink it when they are visible.....

Just some thoughts.