core: add alignment scan lost changes

During the rebase of I4858b7bb few changes has been lost. This patch
reintroduces them.

Change-Id: Ie30552eb8967c5f9e4473fcbf15edd983f25da34
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>