Fixing package name substitution in package declarations and imports